package com.ruoyi.base.domain.client.vx;

import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxPrepayWithRequestPaymentResponse extends PrepayWithRequestPaymentResponse {
    private String appid;
    private String nonceStr;
    private String partnerid;
    private String prepayid;
    private String sign;
    private String timestamp;

    private static final String PACKAGE_PRE = "prepay_id=";

    public String getPackage()
    {
        return PACKAGE_PRE + prepayid;
    }

    public static String prepayid2Package(String prepayid)
    {
        return PACKAGE_PRE + prepayid;
    }
}